<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
//     function getSum(arr) {
//   var uniqueNumbers = [];
//   for (var item of arr) {
//     if (typeof item === 'number' &&!uniqueNumbers.includes(item)) {
//       uniqueNumbers.push(item);
//     }
//   }
//   return uniqueNumbers.reduce((sum, num) => sum + num, 0);
// }
// console.log(getSum([undefined,"23year",19,"097",1,"hello",null,1]));

    function getSum(arr){
        var a = [];
        var sum = 0;
        for(var i= 0 ;i<arr.length;i++){
            if (typeof (arr[i]) === "number" && a.indexOf(arr[i])==-1){
                a.push(arr[i]);
                sum += arr[i];
            }
        }
        return sum;
    }
    console.log(getSum([undefined,"23year",19,"097",1,"hello",null,1]));
</script>